import { NgModule } from '@angular/core'

import { SharedModule } from '@shared'
import { MerchantRoutingModule } from './merchant-routing.module'
import { MerchantListComponent } from './list/list.component'
import { MerchantAlinterService } from './merchant-alinter.service'
import { MerchantService } from './merchant.service'
import { MerchantNewComponent } from './new/new.component'
import { MerchantNewBaseComponent } from './new/base/base.component'
import { MerchantNewSystemComponent } from './new/system/system.component'
import { MerchantNewUserComponent } from './new/user/user.component'
import { MerchantStoreService } from './new/merchant-store.service'
import { MerchantDetailComponent } from './detail/detail.component'
import { MerchantDetailTabSettlementComponent } from './detail/tab-settlement/tab-settlement.component'
import { MerchantDetailTabStoreComponent } from './detail/tab-store/tab-store.component'
import { MerchantDetailTabUserComponent } from './detail/tab-user/tab-user.component'
import { MerchantDetailTabSystemComponent } from './detail/tab-system/tab-system.component'
import { MerchantNewTradeComponent } from './new/trade/trade.component';
import { MerchantDetailTabTradeComponent } from './detail/tab-trade/tab-trade.component'
import { MerchantEditTradeComponent } from './add/trade/trade.component';

const COMPONENTS = [
  MerchantListComponent,
]
const COMPONENTS_NOROUNT = [
  MerchantNewComponent,
  MerchantNewBaseComponent,
  MerchantNewSystemComponent,
  MerchantNewUserComponent,
  MerchantNewTradeComponent,
  MerchantDetailComponent,
  MerchantDetailTabSettlementComponent,
  MerchantDetailTabStoreComponent,
  MerchantDetailTabUserComponent,
  MerchantDetailTabSystemComponent,
  MerchantDetailTabTradeComponent,
  MerchantEditTradeComponent,
]

@NgModule({
  imports: [
    SharedModule,
    MerchantRoutingModule
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT,
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    { provide: MerchantService, useClass: MerchantAlinterService },
    MerchantStoreService,
  ],
})
export class MerchantModule { }
